exports.match = function (item, pattens) {
    sum = function (array) {
        s = 0
        for (i of array) {
            s = s + parseInt(i)
        }
        return parseInt(s)
    }
    urlPath = item.split("/")
    for (patten of pattens) {
        let state = []
        urlPatten = patten.split("/")

        for (i = 0; i < urlPath.length; i++) {
            if (urlPatten[i] == "*") {
                state.push(0)
                continue
            }
            if (urlPath[i] === urlPatten[i]) {
                state.push(0)
                continue
            } else {
                state.push(1)
                continue
            }
        }
        if (sum(state) > 0) {
            continue
        } else {
            return true
        }
    }
    return false
}


exports.uuid = function () {
    return Date.now().toString()
}
